package ruifeng.zcj.mybase.base.base_web_activity.other;


import ruifeng.zcj.mybase.base.base_web_activity.WebViewActivity;

/**
 * Created by Administrator on 2016/8/26 0026.
 */
public class JS {
    WebViewActivity.TextViewChanger mTextViewChanger;
    public String json;// 传递json串给html的js代码


    public void setTextChanger(WebViewActivity.TextViewChanger textChanger) {
        this.mTextViewChanger = textChanger;
    }

    /**
     * 如果 targetSdkVersion >=17，一定要加注解，否则JS无法调用这个方法
     */
    public void jsCallJava(String arg) {
        if (mTextViewChanger != null) {
            mTextViewChanger.changeText(arg);
        }
    }
}
